{% extends 'base.html' %}
{% load staticfiles %}
{% block title %}addmods{% endblock %}
{% block content %}
    <form action="" class="form-inline" style="margin: 20px" method="post">
        <div class="form-group">
            <label>模块名: </label><input type="text" class="form-control" name="modname">
        </div>
        <div class="form-group">
            <label>参数 : </label><input type="text" class="form-control" name="args">
        </div>
        <input type="submit" value="提交" class="btn btn-primary">
    </form>
    <table class="table table-bordered table-striped table-hover">
        <tr class="info">
            <td>模块名</td>
            <td>参数</td>
        </tr>
        {% for mod in mods %}
            <tr>
                <td>{{ mod.module_name }}</td>
                <td>
                    <ul class="list-unstyled">
                        {% for arg in mod.modarg_set.all %}
                            <li>{{ arg.arg_text }}</li>
                        {% endfor %}
                    </ul>
                </td>
            </tr>
        {% endfor %}

    </table>
{% endblock %}